import {Dimensions, StatusBar} from 'react-native';
import DeviceInfo from 'react-native-device-info';

let bundle = DeviceInfo.getBundleId();
let platform = DeviceInfo.getSystemName().toLowerCase();
let version = DeviceInfo.getVersion();
let versionName = bundle.split('.').pop();
if (platform === 'ios') {
    versionName = versionName.split('-').pop();
}

global.AppData = {
    bundle,
    platform,
    version,
    versionName,
    screen_width: Dimensions.get('window').width,
    screen_height: Dimensions.get('window').height,
    bar_height: StatusBar.currentHeight,
    view_center: {justifyContent: 'center', alignItems: 'center', flex: 1},
    main_color: '#FF3733',
};
